<html>
<head><meta charset="utf-8"><title>async threads vs tasks · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/async.20threads.20vs.20tasks.html">async threads vs tasks</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="204674695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/async%20threads%20vs%20tasks/near/204674695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/async.20threads.20vs.20tasks.html#204674695">(Jul 22 2020 at 14:41)</a>:</h4>
<p>A passing thought I had editing Stack Overflow questions — people <em>really</em> don't understand the distinction between tasks and threads when it comes to asynchronous code. Many people say something to the effect of "I want to do this in one thread and that in another thread", but it's rare for them to mean that, and they actually want tasks. </p>
<p>It's complicated by the fact that sometimes you <strong>do</strong> want a separate thread, plus the fact that the bigger executors support multiplexing tasks across threads.</p>



<a name="204691926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/async%20threads%20vs%20tasks/near/204691926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/async.20threads.20vs.20tasks.html#204691926">(Jul 22 2020 at 16:50)</a>:</h4>
<p>Multithreading, concurrency and parallelism are not always taught well, if taught at all in universities/computer science related programs</p>



<a name="204691974"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/async%20threads%20vs%20tasks/near/204691974" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/async.20threads.20vs.20tasks.html#204691974">(Jul 22 2020 at 16:51)</a>:</h4>
<p>So people discover them when needing them, which is very much not optimal for such a subject IMO</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>